<template>
  <div class="enterprisename">
    <div class="title">企业实名验证</div>
    <div class="tx"></div>
    <div class="top-gd" @click="addEnterprisename">
      <span>+新增认证</span>
    </div>
    <ul class="enterprisename-list">
      <li class="enterprisename-item">
        <div class="gd">
          <img v-if="isApprove" src="../../../assets/home/rz-zrz.png">
          <img v-else src="../../../assets/home/rz-yrz.png">
        </div>
        <div class="enterprisename-item-left">
          <span v-if="isApprove">暂无公章</span>
          <img  v-else style="width:100%;height:100%;" src="../../../assets/home/rz-yrz.png" alt="" />
        </div>
        <ul class="enterprisename-item-right">
          <li class="right-name">
            <span>企业名称</span>
            <span class="name">海富德管理咨询（深圳）有限公司</span>
          </li>
          <li class="right-gz">
            <span>更换公章</span>
            <el-upload
              class="upload-demo"
              action="https://jsonplaceholder.typicode.com/posts/"
              :on-preview="handlePreview"
              :on-remove="handleRemove"
              :before-remove="beforeRemove"
              :multiple="false"
              :limit="1"
              :on-exceed="handleExceed"
              :auto-upload="false"
            >
              <el-button size="mini" class="name-bottom">选择文件</el-button>
              <span slot="tip" class="el-upload__tip">
                仅支持GIF、PNG格式，文件小于1M
              </span>
            </el-upload>
          </li>
        </ul>
      </li>
       <li class="enterprisename-item">
        <div class="gd">
          <img v-if="isApprove" src="../../../assets/home/rz-zrz.png">
          <img v-else src="../../../assets/home/rz-yrz.png">
        </div>
        <div class="enterprisename-item-left">
          <span v-if="isApprove">暂无公章</span>
          <img  v-else style="width:100%;height:100%;" src="../../../assets/home/rz-yrz.png" alt="" />
        </div>
        <ul class="enterprisename-item-right">
          <li class="right-name">
            <span>企业名称</span>
            <span class="name">海富德管理咨询（深圳）有限公司</span>
          </li>
          <li class="right-gz">
            <span>更换公章</span>
            <el-upload
              class="upload-demo"
              action="https://jsonplaceholder.typicode.com/posts/"
              :on-preview="handlePreview"
              :on-remove="handleRemove"
              :before-remove="beforeRemove"
              :multiple="false"
              :limit="1"
              :on-exceed="handleExceed"
              :auto-upload="false"
            >
              <el-button size="mini" class="name-bottom">选择文件</el-button>
              <span slot="tip" class="el-upload__tip">
                仅支持GIF、PNG格式，文件小于1M
              </span>
            </el-upload>
          </li>
        </ul>
      </li>
      




      <li class="enterprisename-item">
        <div class="gd">
          <img v-if="isApprove" src="../../../assets/home/rz-zrz.png">
          <img v-else src="../../../assets/home/rz-yrz.png">
        </div>
        <div class="enterprisename-item-left">
          <span v-if="isApprove">暂无公章</span>
          <img  v-else style="width:100%;height:100%;" src="../../../assets/home/rz-yrz.png" alt="" />
        </div>
        <ul class="enterprisename-item-right">
          <li class="right-name">
            <span>企业名称</span>
            <span class="name">海富德管理咨询（深圳）有限公司</span>
          </li>
          <li class="right-gz">
            <span>更换公章</span>
            <el-upload
              class="upload-demo"
              action="https://jsonplaceholder.typicode.com/posts/"
              :on-preview="handlePreview"
              :on-remove="handleRemove"
              :before-remove="beforeRemove"
              :multiple="false"
              :limit="1"
              :on-exceed="handleExceed"
              :auto-upload="false"
            >
              <el-button size="mini" class="name-bottom">选择文件</el-button>
              <span slot="tip" class="el-upload__tip">
                仅支持GIF、PNG格式，文件小于1M
              </span>
            </el-upload>
          </li>
        </ul>
      </li>
       <li class="enterprisename-item">
        <div class="gd">
          <img v-if="isApprove" src="../../../assets/home/rz-zrz.png">
          <img v-else src="../../../assets/home/rz-yrz.png">
        </div>
        <div class="enterprisename-item-left">
          <span v-if="isApprove">暂无公章</span>
          <img  v-else style="width:100%;height:100%;" src="../../../assets/home/rz-yrz.png" alt="" />
        </div>
        <ul class="enterprisename-item-right">
          <li class="right-name">
            <span>企业名称</span>
            <span class="name">海富德管理咨询（深圳）有限公司</span>
          </li>
          <li class="right-gz">
            <span>更换公章</span>
            <el-upload
              class="upload-demo"
              action="https://jsonplaceholder.typicode.com/posts/"
              :on-preview="handlePreview"
              :on-remove="handleRemove"
              :before-remove="beforeRemove"
              :multiple="false"
              :limit="1"
              :on-exceed="handleExceed"
              :auto-upload="false"
            >
              <el-button size="mini" class="name-bottom">选择文件</el-button>
              <span slot="tip" class="el-upload__tip">
                仅支持GIF、PNG格式，文件小于1M
              </span>
            </el-upload>
          </li>
        </ul>
      </li>
      <li class="enterprisename-item">
        <div class="gd">
          <img v-if="isApprove" src="../../../assets/home/rz-zrz.png">
          <img v-else src="../../../assets/home/rz-yrz.png">
        </div>
        <div class="enterprisename-item-left">
          <span v-if="isApprove">暂无公章</span>
          <img  v-else style="width:100%;height:100%;" src="../../../assets/home/rz-yrz.png" alt="" />
        </div>
        <ul class="enterprisename-item-right">
          <li class="right-name">
            <span>企业名称</span>
            <span class="name">海富德管理咨询（深圳）有限公司</span>
          </li>
          <li class="right-gz">
            <span>更换公章</span>
            <el-upload
              class="upload-demo"
              action="https://jsonplaceholder.typicode.com/posts/"
              :on-preview="handlePreview"
              :on-remove="handleRemove"
              :before-remove="beforeRemove"
              :multiple="false"
              :limit="1"
              :on-exceed="handleExceed"
              :auto-upload="false"
            >
              <el-button size="mini" class="name-bottom">选择文件</el-button>
              <span slot="tip" class="el-upload__tip">
                仅支持GIF、PNG格式，文件小于1M
              </span>
            </el-upload>
          </li>
        </ul>
      </li>
       <li class="enterprisename-item">
        <div class="gd">
          <img v-if="isApprove" src="../../../assets/home/rz-zrz.png">
          <img v-else src="../../../assets/home/rz-yrz.png">
        </div>
        <div class="enterprisename-item-left">
          <span v-if="isApprove">暂无公章</span>
          <img  v-else style="width:100%;height:100%;" src="../../../assets/home/rz-yrz.png" alt="" />
        </div>
        <ul class="enterprisename-item-right">
          <li class="right-name">
            <span>企业名称</span>
            <span class="name">海富德管理咨询（深圳）有限公司</span>
          </li>
          <li class="right-gz">
            <span>更换公章</span>
            <el-upload
              class="upload-demo"
              action="https://jsonplaceholder.typicode.com/posts/"
              :on-preview="handlePreview"
              :on-remove="handleRemove"
              :before-remove="beforeRemove"
              :multiple="false"
              :limit="1"
              :on-exceed="handleExceed"
              :auto-upload="false"
            >
              <el-button size="mini" class="name-bottom">选择文件</el-button>
              <span slot="tip" class="el-upload__tip">
                仅支持GIF、PNG格式，文件小于1M
              </span>
            </el-upload>
          </li>
        </ul>
      </li>
    </ul>

  </div>
</template>

<script>
 export default {
    data() {
      return {
        isApprove:true,//是否认证
        fileList: [{name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}, {name: 'food2.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}]
      };
    },
    methods: {
      //新增企业
      addEnterprisename(){

      },
      handleRemove(file, fileList) {
        console.log(file, fileList);
      },
      handlePreview(file) {
        console.log(file);
      },
      handleExceed(files, fileList) {
        // this.$message.warning(`当前限制选择 3 个文件，本次选择了 ${files.length} 个文件，共选择了 ${files.length + fileList.length} 个文件`);
      },
      beforeRemove(file, fileList) {
        return this.$confirm(`确定移除 ${ file.name }？`);
      }
    }
  }
</script>

<style>
</style>